import request from "@/utils/request";

// 登录接口
export function login(data) {
  return request({
    url: "/user/login",
    method: "post",
    data: {
      name: data.username,
      password: data.password,
    },
  });
}

// 用户注册
export function register(data) {
  return request({
    url: "/user/register",
    method: "post",
    data,
  });
}
